/*
 *  Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 *  This source code is licensed under the MIT license found in the LICENSE
 *  file in the root directory of this source tree.
 *
 */

/*
 *  THIS FILE IS AUTOGENERATED. DO NOT MODIFY IT; ALL CHANGES WILL BE LOST IN
 *  VAIN.
 *
 *  @generated
 */
#pragma once

#include <memory>
#include <string>
#include <utility>

#include <folly/Optional.h>
#include <folly/io/IOBuf.h>
#include <mcrouter/lib/carbon/CarbonProtocolReader.h>
#include <mcrouter/lib/carbon/CommonSerializationTraits.h>
#include <mcrouter/lib/carbon/Keys.h>
#include <mcrouter/lib/carbon/ReplyCommon.h>
#include <mcrouter/lib/carbon/RequestCommon.h>
#include <mcrouter/lib/carbon/RequestReplyUtil.h>
#include <mcrouter/lib/carbon/Result.h>
#include <mcrouter/lib/carbon/TypeList.h>
#include <mcrouter/lib/carbon/Variant.h>

#include "mcrouter/lib/carbon/test/gen/gen-cpp2/A_types.h"

#include "mcrouter/lib/network/gen/CommonMessages.h"
#include "mcrouter/lib/carbon/test/gen/BMessages.h"

#include "graphene/ticket/if/gen-cpp2/ticket_rep_types.h"

namespace carbon {
namespace test {
namespace A {

class TestAReply;

class TestARequest : public carbon::RequestCommon, public carbon::test::A::thrift::TestARequest {
 public:
  using reply_type = TestAReply;

  static constexpr size_t typeId = 69;
  static constexpr const char* name = "testA";

  TestARequest() = default;
  TestARequest(const TestARequest&) = default;
  TestARequest& operator=(const TestARequest&) = default;
  TestARequest(TestARequest&&) = default;
  TestARequest& operator=(TestARequest&&) = default;
  explicit TestARequest(folly::StringPiece sp) {
    key_ref() = sp;
  }
  explicit TestARequest(folly::IOBuf&& carbonKey) {
    key_ref() = std::move(carbonKey);
  }

  friend class apache::thrift::Cpp2Ops<TestARequest>;

};

class TestAReply : public carbon::ReplyCommon, public carbon::test::A::thrift::TestAReply {
 public:

  static constexpr size_t typeId = 70;

  TestAReply() = default;
  TestAReply(const TestAReply&) = default;
  TestAReply& operator=(const TestAReply&) = default;
  TestAReply(TestAReply&&) = default;
  TestAReply& operator=(TestAReply&&) = default;
  explicit TestAReply(carbon::Result carbonResult) {
    result_ref() = carbonResult;
  }

  friend class apache::thrift::Cpp2Ops<TestAReply>;

};
} // namespace A
} // namespace test
} // namespace carbon

#include "AMessages-inl.h"
